import React from "react";
import { Button, Checkbox, Form, Input } from "antd";

function Index() {
  const onFinish = (values) => {
    console.log("Success:", values);
  };
  const onFinishFailed = (errorInfo) => {
    console.log("Failed:", errorInfo);
  };
  return (
    <div>
      <div
        style={{
          width: "350px",
          height: "300px",
          background: "#cccccc",
          marginTop: "45vh",
          marginLeft: "40vw",
        }}
      >
        <Form
          name="basic"
          labelCol={{ span: 8 }}
          wrapperCol={{ span: 16 }}
          style={{ maxWidth: 600 }}
          initialValues={{ remember: true }}
          onFinish={onFinish}
          onFinishFailed={onFinishFailed}
          autoComplete="off"
        >
          <Form.Item
            label="账号"
            name="username"
            rules={[{ required: true, message: "请输入注册账号" }]}
          >
            <Input />
          </Form.Item>

          <Form.Item
            label="密码"
            name="password"
            rules={[{ required: true, message: "请输入密码" }]}
          >
            <Input.Password />
          </Form.Item>
          <Form.Item
            label="验证密码"
            name="password"
            rules={[{ required: true, message: "请输入密码" }]}
          >
            <Input.Password />
          </Form.Item>

          <a href="/login">已有帐号</a>

          <Form.Item label={null}>
            <a href="/login">
              <Button >
                注册
              </Button>
            </a>
          </Form.Item>
        </Form>
      </div>
    </div>
  );
}

export default Index;
